package com.ylz.sjzx.sio.core.group.model;

import com.alipay.remoting.Connection;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * Description:
 *
 * @date:2021/9/15
 * @author:wiqi
 */

@Data
@Builder
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class GroupRegister {
    /**
     * 对应连接
     */
    private Connection connection;

    /**
     * 组名称
     */
    private String groupName;

    /**
     * 组名称
     */
    private String gruopRole;


    /**
     * ip
     */
    private String ip;


    /**
     * ip
     */
    private int port;

    /**
     * 拼接地址
     *
     * @return
     */
    public String getAddr() {
        return new StringBuilder().append(ip).append(":").append(port).toString();
    }
}
